
#include "interpol.h"

double interp1(vektor X, vektor Y, double xPos, int t)
{
    int p;
    
    if(X.length == Y.length){
        sortiereVektoren(X,Y);
        
        if(t == Linear){
            if(xPos < X.content[0]){
                
            }else if(xPos > X.content[X.length-1]){
                
            }else{
                p = 0;
                while(xPos > X.content[p])
                    ++p;
                printf("%d\n", p);
            }
        }        
    }else{
        printf("Err: interp1, Vektor length are different. Exit\n");
        exit(1);
    }
    return 0;
}


